<?php


namespace support\service;


use Webman\RedisQueue\Client;
use Webman\RedisQueue\Redis;

class MqClientImpl implements MqClient
{
    /**
     * 异步投递,可能丢失消息
     * @param $queue
     * @param $data
     * @param int $delay
     */
    public function asyncSend($queue, $data, $delay = 0): void
    {
        Client::send($queue, $data, $delay);
    }

    /**
     * 同步投递
     * @param $queue
     * @param $data
     * @param int $delay
     */
    public function send($queue, $data, $delay = 0): void
    {
        Redis::send($queue, $data, $delay);
    }
}